ifndef CC
CC=gcc
endif

ifndef CFLAGS
CFLAGS = -MMD -O2 -Wall -g
endif

# Include directories for CVS version
CFLAGS += -I../driver/modules -I../utils -I../hostapd

# Uncomment following two lines to use portable libdnet and libpcap instead of
# Linux-specific internal implementation for L2 packet handling
#CFLAGS += -DUSE_DNET_PCAP
#LIBS=-ldnet -lpcap

all: wpa_supplicant wpa_passphrase

OBJS = wpa_supplicant.o aes_wrap.o config.o l2_packet.o \
	driver_wext.o driver_hostap.o driver_prism54.o \
	eloop.o common.o md5.o \
	rc4.o sha1.o
OBJS_p = wpa_passphrase.o sha1.o

wpa_supplicant: $(OBJS)
	$(CC) -o wpa_supplicant $(OBJS) $(LIBS)

wpa_passphrase: $(OBJS_p)
	$(CC) -o wpa_passphrase $(OBJS_p)

clean:
	rm -f core *~ *.o wpa_supplicant wpa_passphrase *.d

-include $(OBJS:%.o=%.d)
